package com.lu.statistics.service.impl;

import com.lu.statistics.entity.MtDishInfo;
import com.lu.statistics.entity.enums.ChoiceTypeEnum;
import com.lu.statistics.entity.enums.ProductTypeEnum;
import com.lu.statistics.entity.front.response.DishIGroupResponse;
import com.lu.statistics.entity.front.response.ProGroupResponse;
import com.lu.statistics.service.DishInfoService;
import com.lu.statistics.service.GroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LiquorServiceImpl implements GroupService {
    @Autowired
    private DishInfoService dishInfoService;
    @Override
    public ProGroupResponse queryGroupList(int pageNo, int pageSize) {
        ProGroupResponse groupResponse = new ProGroupResponse();
        MtDishInfo dishInfo = new MtDishInfo();
        dishInfo.setCategoriesId(0);
        dishInfo.setChoiceType(ChoiceTypeEnum.SINGLE_DISH.name());
        DishIGroupResponse dishIGroupResponse = dishInfoService.queryGroupDish(dishInfo, pageNo, pageSize);
//        groupResponse.setCuisineList(dishIGroupResponse.getCuisineList());
        groupResponse.setLiquorList(dishIGroupResponse.getLiquorList());
        groupResponse.setDishTotal(dishIGroupResponse.getDishTotal());
        return groupResponse;
    }

    @Override
    public ProductTypeEnum getType() {
        return ProductTypeEnum.GJMW;
    }
}
